# -*- coding: utf-8 -*-
# @Time    : 2024/9/27 20:12
# @Author  : 荒
# @FileName: cos_bucket_demo.py
# @Software: PyCharm
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client

secret_id = 'AKIDobSEzjXGb7jIk6Xfp2JjHsYOrIk8c4Rt' # 替换为用户的 secret_id
secret_key = 'neTDsjccWMHHGJLQczY6lXJ2gJ5viXI0' # 替换为用户的 secret_key
region = 'ap-chengdu' # 替换为用户的 region

config = CosConfig(Region=region,SecretId=secret_id,SecretKey=secret_key)
client = CosS3Client(config)

response = client.create_bucket(
    Bucket="text-1329244466",
    ACL="public-read" # private  /  public-read / public-read-write
)